package com.mediacloud.app.newsmodule.fragment.newslist

import android.view.View
import android.widget.RelativeLayout
import com.mediacloud.app.fbnavsk.SecondNav
import com.mediacloud.app.newsmodule.R

class NestedNav: SecondNav()
{

    override fun setCatalogItemContentList(manager: androidx.fragment.app.FragmentManager, list: ArrayList<androidx.fragment.app.Fragment?>) {
        isChoosed=true
        super.setCatalogItemContentList(manager, list)
    }

    override fun needSetRealContentMargin(): Boolean {
        return false
    }

    override fun setRelayContentViewPadding() {
        super.setRelayContentViewPadding()
        if(getSecondTabIsNotOnToolBar())
        {
            var secondViewPagerContainer:View?=mRootView.findViewById<View>(R.id.secondViewPagerContainer)
            secondViewPagerContainer?.apply {
                layoutParams?.let {
                    if(it is  RelativeLayout.LayoutParams)
                    {
                        it.topMargin=tableLayoutHeight
                        this.requestLayout()
                    }
                }
            }
        }
    }
}